Expand description
The runtime of compio.
let ans = compio_runtime::Runtime::new().unwrap().block_on(async {
println!("Hello world!");
42
});
assert_eq!(ans, 42);
Modules§
Structs§
- Attacher
- Attach a handle to the driver of current thread.
- Runtime
- The async runtime of compio. It is a thread local runtime, and cannot be sent to other threads.
- Runtime
Builder - Builder for
Runtime
. - Task
- A spawned task.
Functions§
- spawn
- Spawns a new asynchronous task, returning a
Task
for it. - spawn_
blocking - Spawns a blocking task in a new thread, and wait for it.
- submit
- Submit an operation to the current runtime, and return a future for it.
- submit_
with_ flags - Submit an operation to the current runtime, and return a future for it with flags.
Type Aliases§
- Join
Handle - Type alias for
Task<Result<T, Box<dyn Any + Send>>>
, which resolves to anErr
when the spawned future panicked.